package com.siteseat.crudeq.broker.netty;

import com.siteseat.crudeq.broker.transport.BrokerSession;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;

/**
 *
 */
public interface RequestHandler {
  
  boolean isEnabled();
  
  void setEnabled( boolean b );

  boolean needAuthentication( BrokerSession session, Channel ch, ChannelBuffer input, byte reqId ) throws Exception;

  void execute( BrokerSession session, byte reqId, Channel channel, ChannelBuffer input, short version )
          throws Exception;

  short getVersion();

}
